<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>	
	<h6><kbd>&nbsp;文章查看&nbsp;</kbd></h6>
	<form action="" method="post">
			<div class="col-lg-12">
							<div class="btn-group-xs">
								<input type="submit" class="btn btn-info" formaction="{:U(MODULE_NAME.'/Article/create')}" value="写文章" />
								<input type="submit" class="btn btn-danger" value="永久删除" />
								<input type="submit" formaction="{:U(MODULE_NAME.'/Article/removes')}" class="btn btn-warning" value="移到回收站" />
							</div>
			<div >
									 <br/>
									 <div class="form-group-sm form-inline pull-right "> 
									 	<select name="move_sort_id" class="form-control select-inverse-dropdown">
									 	<option value="0">未分类</option>
									 	<foreach name="sorts" item="sort">
									 			<option value="{$sort.id}">{$sort.name}</option>
									 	</foreach>
									 </select>
									<input type="submit" formaction="{:U(MODULE_NAME.'/Article/moves')}" class="btn btn-warning" value="批量移动" />
									     
									 <select name="sort_id" class="form-control select-inverse-dropdown">
									 	<option value="0">未分类</option>
									 	<foreach name="sorts" item="sort">
									 			<option value="{$sort.id}">{$sort.name}</option>
									 	</foreach>
									 </select>
					             	  <input type="text" name="key"  placeholder="请输入要搜索的关键字" class="form-control bg-success">
					                  <input type="submit" formaction="{:U(MODULE_NAME.'/Article/index')}" class="btn btn-danger " value="搜 索" />
					            </div><!-- /input-group -->
				</div>
							
			</div>


			
			<table class="table table-condensed table-hover table-striped table-responsive">
			
					<thead>
						<th><span id="CKALL" class="btn btn-success btn-xs">全选</span></th>
						<th>标题</th>
						<th>类型</th>
						<th>优先级</th>
						<th>分类</th>
						<th>最后更新</th>
						<th>浏览</th>
						<th>操作</th>
					</thead>
					<tbody>
					<foreach name="blogs" item="blog">
					<tr>
						<td><input type="checkbox" name="selectIDS[]" value="{$blog.id}" class="ck" /><kbd class="label-primary">{$blog.id}</kbd>
						</td>
						<td>{$blog.title}</td>
						<td><kbd>{$blog.type}</kbd></td>
						<td><kbd>10</kbd></td>
						<td><kbd>{$blog.sortName|default='未分类'}</kbd></td>
						<td>{$blog.date|date='Y-m-d',###}</td>
						<td><kbd>{$blog.readcount}</kbd></td>
						<td>
							<div class="btn-group btn-group-xs">
								<a href="{:U(MODULE_NAME.'/Article/create',array(id=>$blog['id']))}" class="btn btn-success">编辑</a>
								<a onclick="ShowDialog(this)" data-url="{:U(MODULE_NAME.'/Article/delete',array(id=>$blog['id']))}"  data-toggle="modal" class="btn btn-danger">永久删除</a>
								<a href="{:U(MODULE_NAME.'/Article/remove',array(id=>$blog['id']))}" class="btn btn-warning">回收站</a>
								<eq name="blog['istop']" value="y">
										<a href="{:U(MODULE_NAME.'/Article/cancelRecommend',array(id=>$blog['id']))}" class="btn btn-info">取消推荐</a>
								<else />
									<a href="{:U(MODULE_NAME.'/Article/addRecommend',array(id=>$blog['id']))}" class="btn btn-info">推荐</a>
								</eq>
							</div>
							
						</td>
						</tr>
	
					</foreach>
				
					</tbody>
					<tfoot >
					<th colspan="8" class="pageShow">
						
						{$pageShow}
					</th>
					</tfoot>
				</table>
	
			</form>
				
      			  {:W('Modal/dialog',array("删除提示","你确定要删除选择的文章信息嘛？"))}

	
	</body>		
      	<script src="__PUBLIC__/js/dialogHandle.js"></script>
<script>
		$('#CKALL').click(function()
		{
			$('.ck').prop('checked',$('.ck:checked').length==$('.ck').length?false:true);
		})
</script>

</html>
